﻿using UnityEngine;
using System.Collections;

public class RandomTex : MonoBehaviour {

	public Texture[] tex;
	public Material[] mat;

	// Use this for initialization
	void Start () {
	
		if(mat.Length > 0)
		{
			int i = Random.Range(0,mat.Length);
			renderer.material = mat[i];
		}
		if(tex.Length > 0)
		{
			int i = Random.Range(0,tex.Length);
			renderer.material.mainTexture = tex[i];
		}
		
	}
}
